﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using Biz;
using BusinessLayer.Biz;

namespace BusinessLayer.Dal
{
    public class DatabaseContext : DbContext
    {
        public static DatabaseContext DB = new DatabaseContext();

        /* static DatabaseContext()
        {
            if (DB == null)
                DB = new DatabaseContext();
        } */

        public DatabaseContext()
            : base("WebstoreDbConnectionString")
        {
        }

        public DatabaseContext(String connString)
            : base(connString)
        {

        }

        public DbSet<Category> Categories { get; set; }
        public DbSet<Product> Products { get; set; }
        public DbSet<Property> Properties { get; set; }
        public DbSet<Manufacturer> Manufacturers { get; set; }
        public DbSet<Order> Orders { get; set; }
        public DbSet<OrderedProduct> OrderDetails { get; set; }
        public DbSet<ProductProperties> ProductProperties { get; set; }
        public DbSet<ReceiptNote> ReceiptNotes { get; set; }
        public DbSet<ReceiptDetail> ReceiptDetails { get; set; }
        public DbSet<Unsold> Unsolds { get; set; }
        public DbSet<Provider> Providers { get; set; }
        public DbSet<Comment> Comments { get; set; }
        public DbSet<ProductImage> ProductImages { get; set; }
    }
}